--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
docs/agents/conventions/backend.md e5756d7ab065475a18acdcafc008a767fcff87e0 (e5756d7a) Text, 1.07 KB
Backend conventions
Applies when editing T383838meshchatx/**/*.py.
• Prefer T383838uv run / T383838task for pytest and ruff.
• HTTP handlers: return 400 for T383838ValueError / bad input, 503 for retryable SQLite/Landlock unavailability, 500 only for unexpected failures.
• Multipart parsers must not assume field order.
• SQLite worker connections must set T383838temp_store=MEMORY in T383838DatabaseProvider (Landlock-safe).
• Under Landlock, memory-pressure must not force FILE temp for conversation queries.
• Keep conversation list queries slim: truncate content, derive attachment flags in SQL, avoid shipping full T383838fields blobs.
• Identity restore validates size and empty payloads. Preserve existing identity metadata on re-import.
• No backticks in code comments. Prefer plain words or quoted identifiers.
• RRC / LXMF / LXST changes: open the matching skill under T383838docs/agents/skills/ and run oracle-style tests when behaviour changes.
• Local filesystem browse/upload/download/delete: follow T383838docs/agents/conventions/path-jail.md and T383838docs/agents/skills/path-jail-local-fs/SKILL.md.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────